guint settings_signal_id;
gint icon_size;
gint16 slider_width;
- gint16 spacing;
gint16 button_offset;
guint timer;
guint slider_visible : 1;
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LINKED);
path_bar->priv->get_info_cancellable = NULL;
-
- path_bar->priv->spacing = 0;
path_bar->priv->icon_size = FALLBACK_ICON_SIZE;
}
path_bar->priv->slider_width = MIN (height * 2 / 3 + 5, height);
if (path_bar->priv->button_list && path_bar->priv->button_list->next != NULL)
{
- *minimum += (path_bar->priv->spacing + path_bar->priv->slider_width) * 2;
- *natural += (path_bar->priv->spacing + path_bar->priv->slider_width) * 2;
+ *minimum += path_bar->priv->slider_width * 2;
+ *natural += path_bar->priv->slider_width * 2;
}
}
/* First, we check to see if we need the scrollbars. */
if (path_bar->priv->fake_root)
- width = path_bar->priv->spacing + path_bar->priv->slider_width;
+ width = path_bar->priv->slider_width;
else
width = 0;
gtk_widget_get_preferred_size (child, &child_requisition, NULL);
- width += child_requisition.width + path_bar->priv->spacing;
+ width += child_requisition.width;
if (list == path_bar->priv->fake_root)
break;
}
else
{
gboolean reached_end = FALSE;
- gint slider_space = 2 * (path_bar->priv->spacing + path_bar->priv->slider_width);
+ gint slider_space = 2 * path_bar->priv->slider_width;
if (path_bar->priv->first_scrolled_button)
first_button = path_bar->priv->first_scrolled_button;
gtk_widget_get_preferred_size (child, &child_requisition, NULL);
- if (width + child_requisition.width +
- path_bar->priv->spacing + slider_space > allocation_width)
+ if (width + child_requisition.width + slider_space > allocation_width)
reached_end = TRUE;
else if (list == path_bar->priv->fake_root)
break;
else
- width += child_requisition.width + path_bar->priv->spacing;
+ width += child_requisition.width;
list = list->prev;
}
gtk_widget_get_preferred_size (child, &child_requisition, NULL);
- if (width + child_requisition.width + path_bar->priv->spacing + slider_space > allocation_width)
+ if (width + child_requisition.width + slider_space > allocation_width)
{
reached_end = TRUE;
}
else
{
- width += child_requisition.width + path_bar->priv->spacing;
+ width += child_requisition.width;
if (first_button == path_bar->priv->fake_root)
break;
first_button = first_button->next;
child_allocation.x = allocation->x + allocation->width;
if (need_sliders || path_bar->priv->fake_root)
{
- child_allocation.x -= (path_bar->priv->spacing + path_bar->priv->slider_width);
+ child_allocation.x -= path_bar->priv->slider_width;
up_slider_offset = allocation->width - path_bar->priv->slider_width;
}
}
if (need_sliders || path_bar->priv->fake_root)
{
up_slider_offset = 0;
- child_allocation.x += (path_bar->priv->spacing + path_bar->priv->slider_width);
+ child_allocation.x += path_bar->priv->slider_width;
}
}
gtk_widget_get_preferred_size (child, &child_requisition, NULL);
child_allocation.width = MIN (child_requisition.width,
- allocation_width - (path_bar->priv->spacing + path_bar->priv->slider_width) * 2);
+ allocation_width - 2 * path_bar->priv->slider_width);
if (direction == GTK_TEXT_DIR_RTL)
child_allocation.x -= child_allocation.width;
if (need_sliders && direction == GTK_TEXT_DIR_RTL)
{
gtk_widget_get_allocation (widget, &widget_allocation);
- if (child_allocation.x - path_bar->priv->spacing - path_bar->priv->slider_width < widget_allocation.x)
+ if (child_allocation.x - path_bar->priv->slider_width < widget_allocation.x)
break;
}
else if (need_sliders && direction == GTK_TEXT_DIR_LTR)
{
gtk_widget_get_allocation (widget, &widget_allocation);
- if (child_allocation.x + child_allocation.width + path_bar->priv->spacing + path_bar->priv->slider_width >
+ if (child_allocation.x + child_allocation.width + path_bar->priv->slider_width >
widget_allocation.x + allocation_width)
break;
}
gtk_widget_set_child_visible (child, TRUE);
gtk_widget_size_allocate (child, &child_allocation);
- if (direction == GTK_TEXT_DIR_RTL)
- child_allocation.x -= path_bar->priv->spacing;
- else
- child_allocation.x += child_allocation.width + path_bar->priv->spacing;
+ if (direction == GTK_TEXT_DIR_LTR)
+ child_allocation.x += child_allocation.width;
}
/* Now we go hide all the widgets that don't fit */
while (list)
gtk_widget_get_allocation (BUTTON_DATA (down_button->data)->button, &button_allocation);
space_available = (allocation.width
- - 2 * path_bar->priv->spacing - 2 * path_bar->priv->slider_width
+ - 2 * path_bar->priv->slider_width
- button_allocation.width);
path_bar->priv->first_scrolled_button = down_button;
down_button = down_button->next;
if (!down_button)
break;
- space_available -= (button_allocation.width
- + path_bar->priv->spacing);
+ space_available -= button_allocation.width;
}
}